/* Software Name : AsmDex
 * Version : 1.0
 *
 * Copyright © 2012 France Télécom
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the copyright holders nor the names of its
 *    contributors may be used to endorse or promote products derived from
 *    this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 * THE POSSIBILITY OF SUCH DAMAGE.
 */
package org.objectweb.asmdex.applicationReaderTest;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.objectweb.asmdex.logging.*;
import org.ow2.asmdex.structureCommon.Label;

/**
 * Log List of an application that tests the all the instructions. It has been generated by
 * the Java file GenerateDexAllInstructions. Only one Class has been generated.
 *  
 * @author Julien Névo
 */
public class LogListAllInstructions implements LogList {

	@Override
	public String[] getClassesToParse() {
		return null;
	}

	@Override
	public String getDexFile() {
		return GenerateDexAllInstructions.PATH_AND_FILENAME_GENERATED_DEX_FILE;
	}

	@Override
	public LogElement[] getLogElements() {
		Label label1 = new Label();
		label1.setOffset(0x103 * 2);
		Label label2 = new Label();
		label2.setOffset(0x112 * 2);
		Label label3 = new Label();
		label3.setOffset(0x4e8 * 2 + 0x32);
		Label label4 = new Label();
		label4.setOffset(0x4ea * 2 + 0x32);
		Label label5 = new Label();
		label5.setOffset(0x4ec * 2 + 0x32);
		Label label6 = new Label();
		label6.setOffset(0x4ee * 2 + 0x32);
		Label label7 = new Label();
		label7.setOffset(0x4f1 * 2 + 0x32);
		Label label8 = new Label();
		label8.setOffset(0x4f3 * 2 + 0x32);
		Label label9 = new Label();
		label9.setOffset(0x4f5 * 2 + 0x32);
		Label label10 = new Label();
		label10.setOffset(0x4f7 * 2 + 0x32);
		Label label11 = new Label();
		label11.setOffset(0x190 * 2);
		Label label12 = new Label();
		label12.setOffset(0x238 * 2);
		
		Label labelArray1 = new Label();
		labelArray1.setOffset(0x4f8 * 2 + 0x32);
		Label labelArray2 = new Label();
		labelArray2.setOffset(0x4fe * 2 + 0x32);
		Label labelArray3 = new Label();
		labelArray3.setOffset(0x506 * 2 + 0x32);
		
		Label labelPackedSwitchCase1 = new Label();
		labelPackedSwitchCase1.setOffset(0xb40);
		Label labelSparseSwitchCase1 = new Label();
		labelSparseSwitchCase1.setOffset(0xb54);
		
		List<LogElement> elementsList = new ArrayList<LogElement>();
		
		
		LogElement[] logElements = new LogElement[] {
				new LogElementApplicationVisit() 	// aw.visit();
				
				// Class FirstActivity
				, new LogElementApplicationVisitClass(ACC_PUBLIC, "Lft/nevo/FirstActivity;", null, "Landroid/app/Activity;", null)
				, new LogElementClassVisit(ACC_PUBLIC, "Lft/nevo/FirstActivity;", null, "Landroid/app/Activity;", null)
				
				, new LogElementClassVisitMethod(ACC_PUBLIC, "myMethod1", "V", null, null)
				, new LogElementMethodVisitCode()
				, new LogElementMethodVisitMaxs(30, 0)
				
				// 0x00
				, new LogElementMethodVisitInsn(INSN_NOP)
				// 0x01
				, new LogElementMethodVisitVarInsn(INSN_MOVE, 0, 15)
				, new LogElementMethodVisitVarInsn(INSN_MOVE, 15, 1)
				, new LogElementMethodVisitVarInsn(INSN_MOVE, 7, 8)
				// 0x02
				, new LogElementMethodVisitVarInsn(INSN_MOVE_FROM16, 0, 65535)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_FROM16, 255, 0)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_FROM16, 129, 32907)
				// 0x03
				, new LogElementMethodVisitVarInsn(INSN_MOVE_16, 256, 65535)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_16, 65535, 0)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_16, 1234, 50468)
				// 0x04
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE, 0, 15)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE, 15, 0)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE, 8, 7)
				// 0x05
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE_FROM16, 0, 16)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE_FROM16, 255, 0)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE_FROM16, 128, 65535)
				// 0x06
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE_16, 256, 65535)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE_16, 65535, 0)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_WIDE_16, 12437, 54970)
				// 0x07
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT, 0, 15)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT, 15, 0)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT, 10, 4)
				// 0x08
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT_FROM16, 0, 65535)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT_FROM16, 255, 0)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT_FROM16, 128, 12898)
				// 0x09
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT_16, 256, 65535)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT_16, 65535, 0)
				, new LogElementMethodVisitVarInsn(INSN_MOVE_OBJECT_16, 15679, 30189)
				// 0x0a
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT, 0)
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT, 255)
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT, 130)
				// 0x0b
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT_WIDE, 0)
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT_WIDE, 255)
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT_WIDE, 80)
				// 0x0c
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT_OBJECT, 0)
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT_OBJECT, 255)
				, new LogElementMethodVisitIntInsn(INSN_MOVE_RESULT_OBJECT, 170)
				// 0x0d
				, new LogElementMethodVisitIntInsn(INSN_MOVE_EXCEPTION, 0)
				, new LogElementMethodVisitIntInsn(INSN_MOVE_EXCEPTION, 255)
				, new LogElementMethodVisitIntInsn(INSN_MOVE_EXCEPTION, 60)
				// 0x0e
				, new LogElementMethodVisitInsn(INSN_RETURN_VOID)
				// 0x0f
				, new LogElementMethodVisitIntInsn(INSN_RETURN, 0)
				, new LogElementMethodVisitIntInsn(INSN_RETURN, 255)
				, new LogElementMethodVisitIntInsn(INSN_RETURN, 100)
				// 0x10
				, new LogElementMethodVisitIntInsn(INSN_RETURN_WIDE, 0)
				, new LogElementMethodVisitIntInsn(INSN_RETURN_WIDE, 255)
				, new LogElementMethodVisitIntInsn(INSN_RETURN_WIDE, 70)
				// 0x11
				, new LogElementMethodVisitIntInsn(INSN_RETURN_OBJECT, 0)
				, new LogElementMethodVisitIntInsn(INSN_RETURN_OBJECT, 255)
				, new LogElementMethodVisitIntInsn(INSN_RETURN_OBJECT, 70)
				// 0x12
				, new LogElementMethodVisitVarInsn(INSN_CONST_4, 0, 7)
				, new LogElementMethodVisitVarInsn(INSN_CONST_4, 15, 0)
				, new LogElementMethodVisitVarInsn(INSN_CONST_4, 7, -8)
				// 0x13
				, new LogElementMethodVisitVarInsn(INSN_CONST_16, 0, 16)
				, new LogElementMethodVisitVarInsn(INSN_CONST_16, 16, 0)
				, new LogElementMethodVisitVarInsn(INSN_CONST_16, 15, -32768)
				, new LogElementMethodVisitVarInsn(INSN_CONST_16, 7, 32767)
				// 0x14
				, new LogElementMethodVisitVarInsn(INSN_CONST, 0, 32768)
				, new LogElementMethodVisitVarInsn(INSN_CONST, 255, Integer.MAX_VALUE)
				, new LogElementMethodVisitVarInsn(INSN_CONST, 127, Integer.MIN_VALUE + 1) // +1 to prevent the optimization to CONST/HIGH16
				// 0x15
				, new LogElementMethodVisitVarInsn(INSN_CONST_HIGH16, 255, 0x7fff0000)
				, new LogElementMethodVisitVarInsn(INSN_CONST_HIGH16, 127, 0x12340000)
				, new LogElementMethodVisitVarInsn(INSN_CONST_HIGH16, 0, Integer.MIN_VALUE)
				// 0x16
				, new LogElementMethodVisitVarInsn(INSN_CONST_WIDE_16, 0, -32768)
				, new LogElementMethodVisitVarInsn(INSN_CONST_WIDE_16, 255, 32767)
				, new LogElementMethodVisitVarInsn(INSN_CONST_WIDE_16, 128, 0)
				// 0x17
				, new LogElementMethodVisitVarInsn(INSN_CONST_WIDE_32, 0, -32769)
				, new LogElementMethodVisitVarInsn(INSN_CONST_WIDE_32, 255, 32768)
				, new LogElementMethodVisitVarInsn(INSN_CONST_WIDE_32, 147, Integer.MIN_VALUE)
				, new LogElementMethodVisitVarInsn(INSN_CONST_WIDE_32, 240, Integer.MAX_VALUE)
				, new LogElementMethodVisitVarInsn(INSN_CONST_WIDE_32, 131, 4898789)
				// 0x18
				, new LogElementMethodVisitVarLongInsn(INSN_CONST_WIDE, 0, 0x4545454545L)
				, new LogElementMethodVisitVarLongInsn(INSN_CONST_WIDE, 255, -0x275134515L)
				, new LogElementMethodVisitVarLongInsn(INSN_CONST_WIDE, 45, Long.MAX_VALUE)
				, new LogElementMethodVisitVarLongInsn(INSN_CONST_WIDE, 241, Long.MIN_VALUE + 1) // +1 to prevent the optimization to CONST-WIDE/HIGH16
				// 0x19
				, new LogElementMethodVisitVarLongInsn(INSN_CONST_WIDE_HIGH16, 0, 0x7fff000000000000L)
				, new LogElementMethodVisitVarLongInsn(INSN_CONST_WIDE_HIGH16, 255, Long.MIN_VALUE)
				, new LogElementMethodVisitVarLongInsn(INSN_CONST_WIDE_HIGH16, 61, 0x1234000000000000L)
				// 0x1a
				, new LogElementMethodVisitStringInsn(INSN_CONST_STRING, 0, "myString1")
				, new LogElementMethodVisitStringInsn(INSN_CONST_STRING, 255, "myString1")
				, new LogElementMethodVisitStringInsn(INSN_CONST_STRING, 123, "myString1")
				// 0x1b
				, new LogElementMethodVisitStringInsn(INSN_CONST_STRING_JUMBO, 0, "myString2")
				, new LogElementMethodVisitStringInsn(INSN_CONST_STRING_JUMBO, 255, "myString2")
				, new LogElementMethodVisitStringInsn(INSN_CONST_STRING_JUMBO, 178, "myString2")
				// 0x1c
				, new LogElementMethodVisitTypeInsn(INSN_CONST_CLASS, 0, 0, 0, "myType1")
				, new LogElementMethodVisitTypeInsn(INSN_CONST_CLASS, 255, 0, 0, "myType1")
				, new LogElementMethodVisitTypeInsn(INSN_CONST_CLASS, 45, 0, 0, "myType1")
				// 0x1d
				, new LogElementMethodVisitIntInsn(INSN_MONITOR_ENTER, 0)
				, new LogElementMethodVisitIntInsn(INSN_MONITOR_ENTER, 255)
				, new LogElementMethodVisitIntInsn(INSN_MONITOR_ENTER, 172)
				// 0x1e
				, new LogElementMethodVisitIntInsn(INSN_MONITOR_EXIT, 0)
				, new LogElementMethodVisitIntInsn(INSN_MONITOR_EXIT, 255)
				, new LogElementMethodVisitIntInsn(INSN_MONITOR_EXIT, 63)
				// 0x1f
				, new LogElementMethodVisitTypeInsn(INSN_CHECK_CAST, 0, 0, 0, "myType2")
				, new LogElementMethodVisitTypeInsn(INSN_CHECK_CAST, 0, 255, 0, "myType2")
				, new LogElementMethodVisitTypeInsn(INSN_CHECK_CAST, 0, 179, 0, "myType2")
				// 0x20
				, new LogElementMethodVisitTypeInsn(INSN_INSTANCE_OF, 0, 15, 0, "myType3")
				, new LogElementMethodVisitTypeInsn(INSN_INSTANCE_OF, 15, 0, 0, "myType3")
				, new LogElementMethodVisitTypeInsn(INSN_INSTANCE_OF, 3, 10, 0, "myType3")
				// 0x21
				, new LogElementMethodVisitArrayLengthInsn(0, 15)
				, new LogElementMethodVisitArrayLengthInsn(15, 0)
				, new LogElementMethodVisitArrayLengthInsn(10, 3)
				// 0x22
				, new LogElementMethodVisitTypeInsn(INSN_NEW_INSTANCE, 0, 0, 0, "Landroid/app/Activity;")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_INSTANCE, 255, 0, 0, "Landroid/app/Activity;")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_INSTANCE, 204, 0, 0, "Landroid/app/Activity;")
				// 0x23
				// Must fit the instruction 0x26.
				, new LogElementMethodVisitTypeInsn(INSN_NEW_ARRAY, 0, 0, 6, "[B")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_ARRAY, 15, 0, 5, "[C")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_ARRAY, 10, 0, 7, "[S")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_ARRAY, 7, 0, 7, "[I")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_ARRAY, 5, 0, 7, "[F")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_ARRAY, 2, 0, 8, "[J")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_ARRAY, 1, 0, 7, "[D")
				, new LogElementMethodVisitTypeInsn(INSN_NEW_ARRAY, 3, 0, 6, "[Z")
				// 0x24
				, new LogElementMethodVisitMultiANewArrayInsn("[B", new int[] { 4 })
				, new LogElementMethodVisitMultiANewArrayInsn("[I", new int[] { 0, 15 })
				, new LogElementMethodVisitMultiANewArrayInsn("[F", new int[] { 0, 1, 15 })
				, new LogElementMethodVisitMultiANewArrayInsn("[S", new int[] { 0, 15, 2, 7 })
				, new LogElementMethodVisitMultiANewArrayInsn("[C", new int[] { 0, 4, 13, 10, 3 })
				// 0x25
				, new LogElementMethodVisitMultiANewArrayInsn("[B", new int[] { 0, 1, 2, 3, 4, 5 })
				, new LogElementMethodVisitMultiANewArrayInsn("[I", new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 })
				// 0x26
				// Must fit the instruction 0x23.
				, new LogElementMethodVisitFillArrayDataInsn(0, new Byte[] { 0, -2, -7, 10, Byte.MAX_VALUE, Byte.MIN_VALUE })
				, new LogElementMethodVisitFillArrayDataInsn(15, new Character[] { 1, 17, 91, Character.MAX_VALUE, Character.MIN_VALUE })
				, new LogElementMethodVisitFillArrayDataInsn(10, new Short[] { 0, 5, -6, -170, 491, Short.MAX_VALUE, Short.MIN_VALUE })
				, new LogElementMethodVisitFillArrayDataInsn(7, new Integer[] { 0, -20, -156, 7, 156, Integer.MAX_VALUE, Integer.MIN_VALUE })
				, new LogElementMethodVisitFillArrayDataInsn(5, new Float[] { 0f, 1f, -4f, 99f, -150f, Float.MAX_VALUE, Float.MIN_VALUE })
				, new LogElementMethodVisitFillArrayDataInsn(2, new Long[] { 0L, 1L, -5L, 150L, -1500L, 5679L, Long.MAX_VALUE, Long.MIN_VALUE })
				, new LogElementMethodVisitFillArrayDataInsn(1, new Double[] { 0d, 1d, -5.5d, 897.5d, -9090.45d, Double.MAX_VALUE, Double.MIN_VALUE })
				, new LogElementMethodVisitFillArrayDataInsn(3, new Boolean[] { false, true, true, true, false, true })
				
				, new LogElementMethodVisitLabel(label1)
				// 0x27
				, new LogElementMethodVisitIntInsn(INSN_THROW, 0)
				, new LogElementMethodVisitIntInsn(INSN_THROW, 255)
				, new LogElementMethodVisitIntInsn(INSN_THROW, 199)
				// 0x28
				, new LogElementMethodVisitJumpInsn(INSN_GOTO, label2, 0, 0)
				, new LogElementMethodVisitJumpInsn(INSN_GOTO, label1, 0, 0)
				// 0x29
				, new LogElementMethodVisitJumpInsn(INSN_GOTO_16, label2, 0, 0)
				, new LogElementMethodVisitJumpInsn(INSN_GOTO_16, label1, 0, 0)
				// 0x2a
				, new LogElementMethodVisitJumpInsn(INSN_GOTO_32, label2, 0, 0)
				, new LogElementMethodVisitJumpInsn(INSN_GOTO_32, label1, 0, 0)
				
				, new LogElementMethodVisitLabel(label2)
				
				// 0x2b and 0x2c are below.
		};

		// We begin a second list in which we add elements, generated by loop.
		List<LogElement> elementsList2 = new ArrayList<LogElement>();
		
		// 0x2d -> 0x31
		for (int opcode = INSN_CMPL_FLOAT; opcode <= INSN_CMP_LONG; opcode++) {
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 0, 255, 50, 0));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 255, 184, 0, 0));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 56, 0, 255, 0));
		}
		
		// 0x32 -> 0x37
		for (int opcode = INSN_IF_EQ; opcode <= INSN_IF_LE; opcode++) {
			elementsList2.add(new LogElementMethodVisitJumpInsn(opcode, label1, 0, 15));
			elementsList2.add(new LogElementMethodVisitJumpInsn(opcode, label2, 15, 0));
			elementsList2.add(new LogElementMethodVisitJumpInsn(opcode, label11, 12, 7));
			elementsList2.add(new LogElementMethodVisitJumpInsn(opcode, label12, 1, 13));
		}
		
		// 0x38 -> 0x3d
		for (int opcode = INSN_IF_EQZ; opcode <= INSN_IF_LEZ; opcode++) {
			elementsList2.add(new LogElementMethodVisitJumpInsn(opcode, label1, 0, 0));
			elementsList2.add(new LogElementMethodVisitJumpInsn(opcode, label2, 15, 0));
			elementsList2.add(new LogElementMethodVisitJumpInsn(opcode, label11, 12, 0));
			elementsList2.add(new LogElementMethodVisitJumpInsn(opcode, label12, 1, 0));
		}
		
		// 0x3e - 0x43 (unused)
		
		elementsList2.add(new LogElementMethodVisitLabel(label11));

		// 0x44 -> 0x51
		for (int opcode = INSN_AGET; opcode <= INSN_APUT_SHORT; opcode++) {
			elementsList2.add(new LogElementMethodVisitArrayOperationInsn(opcode, 0, 255, 10));
			elementsList2.add(new LogElementMethodVisitArrayOperationInsn(opcode, 255, 240, 0));
			elementsList2.add(new LogElementMethodVisitArrayOperationInsn(opcode, 189, 0, 255));	
		}
		
		// 0x52 -> 0x5f
		for (int opcode = INSN_IGET; opcode <= INSN_IPUT_SHORT; opcode++) {
			elementsList2.add(new LogElementMethodVisitFieldInsn(opcode, "Lft/nevo/FirstActivity;", "field1", "I", 0, 15));
			elementsList2.add(new LogElementMethodVisitFieldInsn(opcode, "Lft/nevo/FirstActivity;", "field1", "S", 15, 0));
			elementsList2.add(new LogElementMethodVisitFieldInsn(opcode, "Lft/nevo/FirstActivity;", "field1", "J", 3, 9));
		}
		
		elementsList2.add(new LogElementMethodVisitLabel(label12));
		
		// 0x60 -> 0x6d
		for (int opcode = INSN_SGET; opcode <= INSN_SPUT_SHORT; opcode++) {
			elementsList2.add(new LogElementMethodVisitFieldInsn(opcode, "Lft/nevo/FirstActivity;", "field1", "I", 0, 0));
			elementsList2.add(new LogElementMethodVisitFieldInsn(opcode, "Lft/nevo/FirstActivity;", "field1", "S", 15, 0));
			elementsList2.add(new LogElementMethodVisitFieldInsn(opcode, "Lft/nevo/FirstActivity;", "field1", "J", 8, 0));
		}
		
		// 0x6e -> 0x72
		for (int opcode = INSN_INVOKE_VIRTUAL; opcode <= INSN_INVOKE_INTERFACE; opcode++) {
			if (opcode != INSN_INVOKE_STATIC) {
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod1", "V", new int[] {0} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod2", "VI", new int[] {0, 15} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod3", "VII", new int[] {0, 15, 2} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod4", "VIII", new int[] {0, 15, 2, 6} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod5", "VIIII", new int[] {0, 15, 2, 6, 9} ));
			} else {
				// Invoke Static requires one less parameter (no "this").
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod1", "V", new int[] {} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod2", "VI", new int[] {15} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod3", "VII", new int[] {15, 2} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod4", "VIII", new int[] {15, 2, 6} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod5", "VIIII", new int[] {15, 2, 6, 9} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod6", "VIIIII", new int[] {0, 15, 2, 6, 9} ));
			}
		}
		
		// 0x73 (unused)
		
		// 0x74 -> 0x78
		for (int opcode = INSN_INVOKE_VIRTUAL_RANGE; opcode <= INSN_INVOKE_INTERFACE_RANGE; opcode++) {
			if (opcode != INSN_INVOKE_STATIC_RANGE) {
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod1", "V", new int[] {0} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod4", "VIII", new int[] {65532, 65533, 65534, 65535} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod9", "VIIIIIIII", new int[] {50, 51, 52, 53, 54, 55, 56, 57, 58} ));
			} else {
				// Invoke Static Range requires one less parameter (no "this").
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod1", "V", new int[] {} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod4", "VIII", new int[] {65532, 65533, 65534} ));
				elementsList2.add(new LogElementMethodVisitMethodInsn(opcode,  "Lft/nevo/FirstActivity;", "myMethod9", "VIIIIIIII", new int[] {50, 51, 52, 53, 54, 55, 56, 57} ));
			}
		}
		
		// 0x7b -> 0x8f
		for (int opcode = INSN_NEG_INT; opcode <= INSN_INT_TO_SHORT; opcode++) {
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 0, 15, 0, 0));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 15, 0, 0, 0));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 7, 8, 0, 0));
		}
		
		// 0x90 -> 0xaf
		for (int opcode = INSN_ADD_INT; opcode <= INSN_REM_DOUBLE; opcode++) {
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 0, 255, 181, 0));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 255, 52, 0, 0));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 15, 0, 255, 0));
		}
		
		// 0xb0 -> 0xcf
		for (int opcode = INSN_ADD_INT_2ADDR; opcode <= INSN_REM_DOUBLE_2ADDR; opcode++) {
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 0, 0, 15, 0));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 15, 15, 0, 0));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 7, 7, 4, 0));
		}

		// 0xd0 -> 0xd7
		for (int opcode = INSN_ADD_INT_LIT16; opcode <= INSN_XOR_INT_LIT16; opcode++) {
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 0, 15, 0, -32768));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 15, 0, 0, 32767));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 11, 7, 0, 142));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 3, 9, 0, -15));
		}
		
		// 0xd8 -> 0xe2
		for (int opcode = INSN_ADD_INT_LIT8; opcode <= INSN_USHR_INT_LIT8; opcode++) {
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 0, 255, 0, -128));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 255, 0, 0, 127));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 201, 9, 0, 110));
			elementsList2.add(new LogElementMethodVisitOperationInsn(opcode, 4, 189, 0, -45));
		}
		
		// 0xe3 -> 0xff (unused).
		
		// 0x2b
		elementsList2.add(new LogElementMethodVisitTableSwitchInsn(255, 5, 7, label6, new Label[] { label3, label4, label5 }));		
		elementsList2.add(new LogElementMethodVisitLabel(label3));
		elementsList2.add(new LogElementMethodVisitIntInsn(INSN_THROW, 0));
		elementsList2.add(new LogElementMethodVisitJumpInsn(INSN_GOTO, label6, 0, 0));
		elementsList2.add(new LogElementMethodVisitLabel(label4));
		elementsList2.add(new LogElementMethodVisitIntInsn(INSN_THROW, 1));
		elementsList2.add(new LogElementMethodVisitJumpInsn(INSN_GOTO, label6, 0, 0));
		elementsList2.add(new LogElementMethodVisitLabel(label5));
		elementsList2.add(new LogElementMethodVisitIntInsn(INSN_THROW, 2));
		elementsList2.add(new LogElementMethodVisitJumpInsn(INSN_GOTO, label6, 0, 0));
		elementsList2.add(new LogElementMethodVisitLabel(label6));
		
		// 0x2c
		elementsList2.add(new LogElementMethodVisitLookupSwitchInsn(255, label10, new int[] { 2, 10, 3000 }, new Label[] { label7, label8, label9 }));
		elementsList2.add(new LogElementMethodVisitLabel(label7));
		elementsList2.add(new LogElementMethodVisitIntInsn(INSN_THROW, 0));
		elementsList2.add(new LogElementMethodVisitJumpInsn(INSN_GOTO, label10, 0, 0));
		elementsList2.add(new LogElementMethodVisitLabel(label8));
		elementsList2.add(new LogElementMethodVisitIntInsn(INSN_THROW, 1));
		elementsList2.add(new LogElementMethodVisitJumpInsn(INSN_GOTO, label10, 0, 0));
		elementsList2.add(new LogElementMethodVisitLabel(label9));
		elementsList2.add(new LogElementMethodVisitIntInsn(INSN_THROW, 2));
		elementsList2.add(new LogElementMethodVisitJumpInsn(INSN_GOTO, label10, 0, 0));
		elementsList2.add(new LogElementMethodVisitLabel(label10));

		elementsList2.add(new LogElementMethodVisitInsn(INSN_RETURN_VOID));
		
		
		// Now comes the labels (only ! The data is skipped) of the Packed Switch case
		// and Sparse Switch case.
		
		// NOP padding.
		elementsList2.add(new LogElementMethodVisitInsn(INSN_NOP));
		
		elementsList2.add(new LogElementMethodVisitLabel(labelPackedSwitchCase1));
		elementsList2.add(new LogElementMethodVisitLabel(labelSparseSwitchCase1));
		
		elementsList2.add(new LogElementMethodVisitEnd());

		// Declaration of the empty methods.
		addEmptyMethod(elementsList2, ACC_PUBLIC, "myMethod2", "V");
		addEmptyMethod(elementsList2, ACC_PUBLIC, "myMethod3", "VII");
		addEmptyMethod(elementsList2, ACC_PUBLIC, "myMethod4", "VIII");
		addEmptyMethod(elementsList2, ACC_PUBLIC, "myMethod5", "VIIII");
		addEmptyMethod(elementsList2, ACC_PUBLIC, "myMethod6", "VIIIII");
		addEmptyMethod(elementsList2, ACC_PUBLIC, "myMethod7", "VIIIIII");
		addEmptyMethod(elementsList2, ACC_PUBLIC, "myMethod8", "VIIIIIII");
		addEmptyMethod(elementsList2, ACC_PUBLIC, "myMethod9", "VIIIIIIII");
		
		elementsList2.add(new LogElementClassVisitEnd());		
		elementsList2.add(new LogElementApplicationVisitEnd());
		
		
		
		elementsList.addAll(Arrays.asList(logElements));
		elementsList.addAll(elementsList2);
		
		return elementsList.toArray(new LogElement[0]);
	}

	private void addEmptyMethod(List<LogElement> elementsList, int access,
			String name, String desc) {
		elementsList.add(new LogElementClassVisitMethod(access, name, desc, null, null));
		elementsList.add(new LogElementMethodVisitCode());
		elementsList.add(new LogElementMethodVisitMaxs(0, 0));
		elementsList.add(new LogElementMethodVisitEnd());
	}

}
